home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / gdb.new / gdb-4.0 / bfd / doc / unPROTO < prev   
Encoding:
Text File  |  1991-08-24  |  542 b   |  19 lines

  1. #
  2. # The PROTO macro is a subterfuge to be compatible with both ANSI and K&R 
  3. # declaration syntax.  It's not widely known, so for the docn just map the 
  4. # thing to ANSI declaration syntax.
  5. # First, join up defns broken across multiple lines in source---but leave
  6. # any linebreaks, to prettify our examples 
  7. :pbegn
  8. /PROTO(.*, *$/N
  9. s/\n/?/
  10. t pbegn
  11. s/?/\
  12. /g
  13. # Now actually do the PROTO interpretation.
  14. # A PROTO invocation looks like
  15. #   PROTO( resulttype, function, (arglist));
  16. s/[     ]*PROTO(\(.*\),[\n     ]*\(.*\),[\n     ]*\((.*)\));/\1 \2\3;/
  17.  
  18.